#include <stdio.h>
#include "socketpair_protocol.h"
#include "server.h"

/* 
 * 处理收到的数据，并向sockfd写入返回值
 * */
void proc_protocol(int sockfd, const char *buf)
{
	sp_prot_t *header = (sp_prot_t *)buf;

	if (!buf)
		goto end;
	if (header->data_type == DATA_CMD_RET) {
	}
	else if (header->data_type == DATA_UDP) {
		if (header->user_type == USER_SERIAL) {
		}
		else if (header->user_type = USER_IP) {
		}
		else goto end;
	}
	else goto end;
end:
	return;
}
